function settllogging(mode)
% SETTLLOGGING set targetLink bloks logging mode 
% 
% INPUT :
%        ({'off'} | on )
%
% SYNC :
%       settllogging('on')			set logging on
%       settllogging('off')			set logging off

loggingmode = 3;
if nargin < 1
	mode = 'off';
end
if strcmp(mode,'on')
	loggingmode = 1;
end
ublks = find_system(gcs,'SearchDepth',1,'Selected','on');

for iblk = 1 : length(ublks)
	tl_set(ublks{iblk,1},'logdata.loggingmode',loggingmode);
end